<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use app\middleware\Auth;
use app\middleware\Login;
use think\facade\Route;

Route::group(function () {
	Route::miss(function() {
		return '404 Not Found!';
	});
	
	Route::group('Config',function () {
		Route::get('getPrivacyPolicy', 'config/getPrivacyPolicy');
		Route::get('getUserAgreement', 'config/getUserAgreement');
		Route::get('getRiskContent', 'config/getRiskContent');
		Route::get('getRiskCase', 'config/getRiskCase');
		Route::get('getScoreContent', 'config/getScoreContent');
		Route::get('getBannerList', 'config/getBannerList');
		Route::get('getMobile', 'config/getMobile');
		Route::get('getHelp', 'config/getHelp');
		Route::get('getUserAgreement', 'config/getUserAgreement');
		Route::get('getPrivacyPolicy', 'config/getPrivacyPolicy');
		Route::get('getUserinfoExplain', 'config/getUserinfoExplain');
		Route::get('getMpExplain', 'config/getMpExplain');
		Route::get('getRulesExplain', 'config/getRulesExplain');
	});
	
	Route::group('/',function () {
		Route::any('/', 'Index/index');
	});

    Route::group('Crew',function () {
        Route::get('/', 'Crew/index');
    });

    Route::group('Platform',function () {
        Route::post('register', 'Platform/register');
    });

    Route::group('OSS',function () {
        Route::GET('getVideoUploadAuth', 'OSS/getVideoUploadAuth');
    });
	
	Route::group('Notify',function () {
		Route::any('returnNotify', 'Notify/returnNotify');
		Route::any('withdrawNotify', 'Notify/withdrawNotify');
	});
	
	Route::group('Sms',function () {
		Route::post('send', 'Sms/send');
		Route::post('verifyMobile', 'Sms/verifyMobile');
	});
	
	Route::group('User',function () {
		Route::post('login', 'User/login');
	});
	
	Route::group('Area',function () {
		Route::get('getRegion', 'Area/getRegion');
		Route::get('getProvince', 'Area/getProvince');
		Route::get('getCity', 'Area/getCity');
		Route::get('getDistrict', 'Area/getDistrict');
		Route::get('getHotCity', 'Area/getHotCity');
	});
	
	Route::group('Room',function () {
		Route::get('/', 'Room/index');
		Route::get('roomLog', 'Room/roomLog');
	});
	
	Route::group('Oss',function () {
		Route::get('getVideoUploadAuth', 'Oss/getVideoUploadAuth');
	});
	
	#需要登陆
	Route::group(function () {
		
		Route::group('Config',function () {
			Route::get('getCustomer', 'config/getCustomer');
			Route::get('autoReply', 'config/autoReply');
			Route::get('getInviteContent', 'config/getInviteContent');
		});
		
		Route::group('User',function () {
			Route::get('getUserInfo', 'User/getUserInfo');
			Route::post('bindMobile', 'User/bindMobile');
			Route::post('bindInvitecode', 'User/bindInvitecode');
			Route::get('getQRCode', 'User/getQRCode');
			Route::post('withdraw', 'User/withdraw');
			Route::get('withdrawList', 'User/withdrawList');
			Route::post('resetTradepwd', 'User/resetTradepwd');
			Route::get('team', 'User/team');
			Route::post('closeTradepwd', 'User/closeTradepwd');
			Route::post('userEdit', 'User/userEdit');
			Route::get('userMoney', 'User/userMoney');
			Route::post('changeMobile', 'User/changeMobile');
			Route::get('collect', 'User/collect');
			Route::get('coupon', 'User/coupon');
			Route::get('getImSign', 'User/getImSign');
			Route::get('userScore', 'User/userScore');
			Route::get('getInviteImage', 'User/getInviteImage');
			Route::get('getChild', 'User/getChild');
			Route::get('adviseClass', 'User/adviseClass');
			Route::post('adviseAdd', 'User/adviseAdd');
			Route::post('scan', 'User/scan');
			Route::post('logoff', 'User/logoff');
		});
		
		Route::group('Sms',function () {
			Route::post('verifyTradepwdSms', 'Sms/verifyTradepwdSms');
			Route::post('verifyMobile', 'Sms/verifyMobile');
		});
		
		Route::group('Bank',function () {
			Route::get('bank', 'Bank/bank');
			Route::post('addBank', 'Bank/addBank');
			Route::post('deleteBank', 'Bank/deleteBank');
			Route::get('bankList', 'Bank/bankList');
			Route::post('editBank', 'Bank/editBank');
			Route::get('detail', 'Bank/detail');
		});
		
		
		Route::group('Credit',function () {
			Route::post('createCredit', 'Credit/createCredit');
			Route::get('credit', 'Credit/credit');
			Route::get('combination', 'Credit/combination');
		});
		
		Route::group('Advise',function () {
			Route::post('adviseAdd', 'Advise/adviseAdd');
			Route::get('class', 'Advise/class');
		});
		
		Route::group('Vip',function () {
			Route::get('index', 'Vip/index');
			Route::post('createOrder', 'Vip/createOrder');
		});
		
		
		Route::group('Loan',function () {
			Route::post('createLoan', 'Loan/createLoan');
			Route::get('getLoanConfig', 'Loan/getLoanConfig');
		});
		
		Route::group('Room',function () {
			Route::get('detail', 'Room/detail');
			Route::post('collect', 'Room/collect');
		});
		
	})->middleware([Auth::class])->middleware(Login::class);
	
	
})->allowCrossDomain();
